import mountNativeElement from "./mountNativeElement";
import isFunction from './isFunction'
import mountComponent from './mountComponent'

export default function mountElement(virtualDOM, container) {
  // Component VS NativeElement
  if (isFunction(virtualDOM)) {
    // 组件：函数组件、类组件
    // console.log(virtualDOM)
    mountComponent(virtualDOM, container)
  } else {
    // 普通元素
    mountNativeElement(virtualDOM, container)
  }
}